package com.leo.service.impl;

import com.leo.mapper.UserInfoMapper;
import com.leo.model.UserInfo;
import com.leo.service.UserInfoService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName: UserInfoServiceImpl
 * @Description: 简单的增删改查
 * @Author: leo825
 * @Date: 2020-01-02 11:24
 * @Version: 1.0
 */
@Transactional
@Service
public class UserInfoServiceImpl implements UserInfoService {

    @Resource
    UserInfoMapper userInfoMapper;

    @Override
    public void insertUserInfo(UserInfo userInfo) {
        userInfoMapper.insertUserInfo(userInfo);
    }

    @Override
    public void deleteUserInfo(Integer id) {
        userInfoMapper.deleteUserInfo(id);
    }

    @Override
    public void updateUserInfo(UserInfo newUserInfo) {
        userInfoMapper.updateUserInfo(newUserInfo);
    }

    @Override
    public List<UserInfo> getUserInfoList() {
        return userInfoMapper.getUserInfoList();
    }
}
